package com.hippo.javacore.javaiostream.iostream;

import java.io.PrintWriter;

/**
 * @ClassName PrintWriterOpt
 * @Description TODO 字符打印流操作类
 * @Author tangxl
 * @create 2023-04-07 09:11
 **/
public class PrintWriterOpt {
    public static void main(String[] args) {
        try(
                // 1.创建打印流管道
                PrintWriter pw = new PrintWriter("study-commons/java-file-iostream/src/main/resources/file/a.txt","UTF-8");
                ){
            // 2.打印数据
            pw.println(97);
            pw.println("你好中国");
            pw.println(true);
            // 3.写入数据
            pw.write(97);
        }catch (Exception e) {
            e.printStackTrace();
        }
    }
}
